package com.kantboot.tool.edu.domain.entity;

import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import java.io.Serializable;

/**
 * 专业可获得的学位
 */
@Entity
@Getter
@Setter
@Table(name = "tool_edu_major_degree")
@Accessors(chain = true)
@EntityListeners(AuditingEntityListener.class)
@DynamicUpdate
@DynamicInsert
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "id")
public class ToolEduMajorDegree implements Serializable {

    /**
     * 主键
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long id;

    /**
     * 专业学科编码
     * 对应ToolEduMajor的code
     */
    @Column(name = "major_subject_code",length = 64)
    private String majorSubjectCode;

    /**
     * 专业学位编码
     * 对应ToolEduMajor的code
     */
    @Column(name = "major_degree_code",length = 64)
    private String majorDegreeCode;

}
